package com.oo.polymorphic_4.area;

import java.util.Scanner;

/**
 * Test--${description}
 *
 * @author: Jovi
 * @createTime: 2017-05-09 16:29
 **/
public class Test {

    public static void main(String[] args) {
        System.out.println("请选择图形：（1.圆形，2.矩形，3.三角形）");
        Scanner sc = new Scanner(System.in);
        int id = sc.nextInt();
        Shape shape = ShapeFactory.getShape(id);
        if (shape != null) {
            shape.getArea();
        }
    }
}
